import { BaseApi } from "@/api-services/apis/baseApi";
import { SysMenu } from "@/api-services/models/system";

/**
 * 菜单管理Api
 */
class SysMenuApi extends BaseApi<SysMenu.SysMenuInfo, SysMenu.MenuInput, SysMenu.MenuInput> {
  getMenuTree = async () => {
    return await this.normalGet<Array<SysMenu.SysMenuInfo>>(`/tree`, null);
  };
  getApiResource = () => {
    return this.normalGet<Array<SysMenu.ApiResource>>(`/getApiResource`, null);
  };
}

export default new SysMenuApi("/system/menu");
